<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   <script>
        const p1 = new Promise((resolve,reject)=>{
            try{
                console.log("开始请求数据a......");
                // throw new Error("a数据错误")
                setTimeout(()=>{
                    console.log("a数据请求成功!!!");
                    resolve("a数据")
                },1500)
            }catch(e){
                reject("a数据请求失败~~~")
            }
        })

        const p2 = new Promise((resolve,reject)=>{
            try{
                console.log("开始请求数据b......");
                throw new Error("b数据错误")
                setTimeout(()=>{
                    console.log("b数据请求成功!!!");
                    resolve("b数据")
                },2000)
            }catch(e){
                reject("b数据请求失败~~~")
            }
        })

        const p3 = new Promise((resolve,reject)=>{
            try{
                console.log("开始请求数据c......");
                // throw new Error("c数据错误")
                setTimeout(()=>{
                    console.log("c数据请求成功!!!");
                    resolve("c数据")
                },2500)
            }catch(e){
                reject("c数据请求失败~~~")
            }
        })

       const result =  Promise.allSettled([p1,p2,p3])
       console.log(result);

   </script> 
</body>
</html>